package com.zkgengkun.runner;

import com.zkgengkun.repository.BlogRepository;
import com.zkgengkun.support.reader.PropertiesReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author gengshikun
 * @date 2016/11/25
 */
@Component
public class Runner implements CommandLineRunner {

    private static final Logger logger = LoggerFactory.getLogger(Runner.class);

    @Autowired
    private BlogRepository blogRepository;

    /**
     * @param strings
     * @throws Exception
     */
    @Override
    public void run(String... strings) throws Exception {
        PropertiesReader.cacheJsoupProperties();  // 缓存jsoup
        PropertiesReader.cacheBookProperties();  // 缓存book
        PropertiesReader.cacheAlipayProperties(); // 缓存alipay参数
    }


}
